<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('rd_alarm_danger_type', function (Blueprint $table) {
            $table->comment('隐患类别');
            $table->bigIncrements('id');
            $table->string('name', 255)->comment('隐患名称');
            $table->string('icon')->nullable()->comment('隐患图标');
            $table->string('description', 255)->comment('隐患描述');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('rd_alarm_danger_type');
    }
};